#ifndef PROTOCOLHELPER_H
#define PROTOCOLHELPER_H

#include "Protocol.h"

#include <QDateTime>
#include <QString>


namespace Protocol {

class Helper
{
private:
	Helper();

public:
	static QString commandNameByType(int type);
	static QString deviceStateToString(int state);


	static QString fromStringStream(QDataStream& readStream);
	static QDateTime dateTimeFromStream(QDataStream& readStream);
	static int fromEnumStream(QDataStream& readStream);

	static void stringToDataStream(QDataStream& writeStream, const QString& string);
	static void dateTimeToDataStream(QDataStream& writeStream, const QDateTime& dateTime);
	static void enumToDataStream(QDataStream& writeStream, const int& Enum);

	static QString commandToHexString(QByteArray& data);
};

}

#endif // PROTOCOLHELPER_H
